package com.rule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description : 自定义Ribbon负载均衡算法
 * @Author : YTY
 * @Date : 2020-12-09 17:52
 */

@Configuration
public class MyRule {

    @Bean
    public IRule iRule() {

        return new RandomRule();
    }

}
